﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace Zatify.WebUI.Admin.Models
{
    public class PaymentInfoViewModel
    {
        public int? BusinessId { get; set; }
        public string BusinessName { get; set; }

        //[Required(ErrorMessage="Credit Card # required")]
        [RegularExpression(@"^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$",
            ErrorMessage="Incorrect credit card number format")]
        public string CreditCardNo { get; set; }
        
        //[Required]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:dd.MM.yyyy}")]
        public DateTime? CreditCardExpDate { get; set; }

        //[Required(ErrorMessage = "Credit Card Name required")]
        public string CreditCardName { get; set; }

        //[Required(ErrorMessage = "Credit Card PIN required")]
        public string CreditCardPin { get; set; }

        //[Required(ErrorMessage = "Street Address required")]
        public string BillingAddress1 { get; set; }

        //[Required(ErrorMessage = "Street Address 2 required")]
        public string BillingAddress2 { get; set; }

        //[Required(ErrorMessage = "City required")]
        public string BillingCity { get; set; }
        public string BillingStateCode { get; set; }

        //[Required(ErrorMessage = "Zip required")]
        [RegularExpression(@"^\d{5}(-\d{4})?$", ErrorMessage = " Zip code must be 5 characters length")]
        public string BillingZipCode { get; set; }

        public bool BillingUse { get; set; }


        public string BusinessAddress1 { get; set; }
        public string BusinessAddress2 { get; set; }
        public string BusinessCity { get; set; }
        public string BusinessStateCode { get; set; }
        public string BusinessZipCode { get; set; }
    }
}